﻿using Abp.Domain.Repositories;
using shenghua.Common.WordNodes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace shenghua.Basics.MemberFormItems
{
    public class MemberFormItemManager : WordNodeManager<MemberFormItem>
    {
        public MemberFormItemManager(IRepository<MemberFormItem> memberFormItemRepository)
            : base(memberFormItemRepository)
        {
        }

        public async Task EnableWhenRegister(int wordId, bool value)
        {
            MemberFormItem word = _repository.Get(wordId);
            word.EnableWhenRegister = value;
        }

        public async Task IsRequire(int wordId, bool value)
        {
            MemberFormItem word = _repository.Get(wordId);
            word.IsRequired = value;
        }
    }
}
